#define _CRT_SECURE_NO_WARNINGS 1
#include"BinaryTreeNode.h"
#include"Heap.h"
#include"Queue.h"

BTNode* CreatBinaryTree()
{
	BTNode* nodeA = BuyNode('A');
	BTNode* nodeB = BuyNode('B');
	BTNode* nodeC = BuyNode('C');
	BTNode* nodeD = BuyNode('D');
	BTNode* nodeE = BuyNode('E');
	BTNode* nodeF = BuyNode('F');
	BTNode* nodeG = BuyNode('G');
	nodeA->left = nodeB;
	nodeA->right = nodeC;
	nodeB->left = nodeD;
	nodeC->left = nodeE;
	nodeC->right = nodeF;
	nodeE->left = nodeG;
	return nodeA;
}

int main()
{
	BTNode* root = CreatBinaryTree();
	PreOrder(root);
	printf("\n");
	InOrder(root);
	printf("\n");
	PostOrder(root);
	printf("\n");

	//int n1 = 0;
	//BinaryTreeSize(root, &n1);
	//printf("TreeSize:%d\n", n1);

	printf("TreeSize: %d\n", BinaryTreeSize(root));
	printf("TreeLeafSize: %d\n", BinaryTreeLeafSize(root));
	printf("TreeLevelKSize: %d\n", BinaryTreeLevelKSize(root,3));
	printf("BinaryTreeDepth: %d\n", BinaryTreeDepth(root));
	BinaryTreeLevelOrder(root);
	printf("%d\n", BinaryTreeComplete(root));

	BinaryTreeDestroy(root);
	root = NULL;

	return 0;
}